package cn.exrick.xboot.modules.member.entity;

import cn.exrick.xboot.base.XbootBaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author Ydp
 */
@Data
@Accessors(chain = true)
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "t_member_history")
@TableName("t_member_history")
@ApiModel(value = "会员历史用户")
public class MemberHistory extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("卡号")
    private String memberCardNo;

    @ApiModelProperty(value = "姓名")
    private String memberName;

    @ApiModelProperty(value = "手机号码")
    private String memberTel;

    @ApiModelProperty(value = "固定电话")
    private String memberGdTel;

    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "会员生日")
    private Date memberBirthDay;

    @ApiModelProperty(value = "会员性别")
    private String memberSex;

    @ApiModelProperty(value = "会员密码")
    private String memberPassword;

    @ApiModelProperty(value = "会员等级")
    private String memberLevel;


    @ApiModelProperty(value = "电子邮箱")
    private String memberEmail;


    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "过期时间")
    private Date memberEndDate;


    @ApiModelProperty(value = "会员地址")
    private String memberAddress;

    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开卡时间")
    private Date memberUseDate;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "会员头像")
    private String memberFaceUrl;
}